<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="template.xhtml" >        
        <ui:define name="content" >
            Please choose the product name:
            <h:form>
                <h:selectOneMenu value="#{listProblemsController.select_pro_title}">

                    <f:selectItems value="#{listProblemsController.pro_titles}" />
                </h:selectOneMenu>
                <h:commandButton value="search" action="#{listProblemsController.listProblemsByProduct()}"></h:commandButton>

                <table id="table1" style="border: 1pt #000000; " >
                    <tr><td>title</td><td>description</td><td>product</td><td>created by   </td><td>state</td><td>operation</td>
                    </tr>
                    <ui:repeat var="p" value="#{listProblemsController.temp}" varStatus="status">
                        <tr>
                            <td>#{p.title}</td><td>#{p.description}</td><td>#{p.productinvolve.title}
                            </td><td>#{p.creator.userName}</td><td>#{p.state}</td>
                        </tr>
                    </ui:repeat>
                </table>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
